import React from 'react';
import Login from './pages/Login';
import { useRoutes, Link } from 'react-router-dom'
import routes from './router/routes'
import useRouterwithGuard from './hooks/useRouterwithGuard';
import Layoutbox from './layout';
import './style/home.css'
function App() {

    // let element = useRoutes(routes)
    let element = useRouterwithGuard({ routes, tokenKey: 'lh-token' })
    return (
        <div className="App">
            {/* <Link to={'/login'}>登录</Link>
      <br />
      <Link to={'/home'}>主页</Link> */}
            <Layoutbox>
                {element}

            </Layoutbox>


        </div>
    );
}

export default App;
